<template>
  <div class="search-customs">
    <CommonTimeTop></CommonTimeTop>
    <div class="search-input">
      <el-autocomplete size="small"
                       class="inline-input"
                       v-model="searchCountry" @blur="countryBlur"
                       :fetch-suggestions="querySearch"
                       placeholder="输入国家名称（选择下拉菜单）"
                       :trigger-on-focus="true"
                       @select="handleSelect">
        <template slot-scope="{ item }">
          <div class="name" v-html="item"></div>
        </template>
      </el-autocomplete>
      <el-button type="primary" size="small" plain @click="changeCountry">搜 索</el-button>
    </div>
    <!--表单部分-->
    <div class="form-customs">
      <div class="country">
        <img :src="require(`../../../public/img/frags/${src}.png`)" alt="">
        <span>{{selectCountry}}</span>
      </div>
      <div class="content" v-loading="loading"
           element-loading-text="loading"
           element-loading-spinner="el-icon-loading"
           element-loading-background="rgba(0, 0, 0, 0.45)">
        <el-form ref="form" :model="form" label-width="100px"  @keyup.enter.native="search">
          <el-form-item label="HS编码：" v-show="columnStr.indexOf('HS')!=-1">
            <el-input v-model="form.hs" size="small" :placeholder="hsPlaceholder"></el-input>
          </el-form-item>
          <el-form-item label="产品：" v-show="columnStr.indexOf('Product')!=-1">
            <el-input v-model="form.Pro" placeholder="英语" size="small"></el-input>
          </el-form-item>
          <el-form-item label="发货商名称：" v-show="columnStr.indexOf('Shipper')!=-1">
            <el-input v-model="form.Shipper_name" size="small"></el-input>
          </el-form-item>
          <el-form-item label="收货商名称：" v-show="columnStr.indexOf('Consignee')!=-1">
            <el-input v-model="form.Consignee_name" size="small"></el-input>
          </el-form-item>
          <el-form-item label="起始时间："  v-show="hasTime">
            <el-date-picker size="small" @change="handleTime"
                            v-model="dateShow" :clearable="false"
                            type="monthrange" value-format="yyyy-MM"
                            range-separator="-"
                            start-placeholder="开始日期"
                            end-placeholder="结束日期">
            </el-date-picker>
          </el-form-item>
        </el-form>
        <div class="form-right-btn">
          <el-button type="default" size="small" @click="reset">重 置</el-button>
          <el-button type="primary" size="small" @click="search" :loading="isLoad">{{isLoad?'查询中':'查 询'}}</el-button>
        </div>
      </div>
      <div class="hg-title" v-show="hgTitle!=''" v-html="hgTitle"></div>
    </div>
    <!-- 未查询到数据-->
    <div v-show="hasData" class="no-data">
      未查询到相关数据
    </div>
    <!--表格部分-->
    <div class="customs-table" v-show="total>0">
      <!--顶部选择-->
      <h1 class="title"><span v-show="multipleSelection.length>0">已选择 {{multipleSelection.length}} 个客户</span>
        <button @click="downLoad('')">
          <svg class="icon" aria-hidden="true" style="font-size: 19px">
            <use xlink:href="#icon-xls"></use>
          </svg>
          下载
        </button>
        <button @click="downLoad('all')">
          <svg class="icon" aria-hidden="true" style="font-size: 19px">
            <use xlink:href="#icon-xls"></use>
          </svg>
          下载全部页
        </button>
        <button @click="lookEchart" v-show="showEchart">
          <svg class="icon" aria-hidden="true" style="font-size: 19px">
            <use xlink:href="#icon-doc"></use>
          </svg>
          查看国家图表
        </button>
        <b>如果图表加载失败，请检查页面是否被浏览器拦截</b>
      </h1>
      <!--表格展示内容部分-->
      <el-table :data="tableData" style="width: 100%" @selection-change="handleSelectionChange">
        <el-table-column type="selection" width="55">
        </el-table-column>
        <el-table-column :label="date.col_cn" v-for="(date, key) in tableHead" :show-overflow-tooltip="true">
          <template scope="scope">
            <span v-if="target.includes(date.col_en)"
                  style="color: #2A97F9"
                  :title="tableData[scope.$index][key+1]"
                  v-html="tableData[scope.$index][key+1]?tableData[scope.$index][key+1]:'-'" @click="toDetail(scope.row)"></span>
            <span v-else v-html="tableData[scope.$index][key+1]" :title="tableData[scope.$index][key+1]"
                  @click="toDetail(scope.row)"></span>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination class="fixed"
                     background align="right"
                     @current-change="handleCurrentChange"
                     @size-change="handleSizeChange"
                     :current-page="nowPage"
                     :page-size="nowSize"
                     :page-sizes="[15,30,50]"
                     layout="total, sizes, prev, pager, next, jumper"
                     :total="total">
      </el-pagination>
    </div>
    <DialogDownload ref="dialogDownload"></DialogDownload>
  </div>
</template>

<script>
    import {searchList, getList, getInput, downLoad} from '@/api/automation/customs'
    import DialogDownload from '@/components/ocean/DialogDownload'
    import {isUSA,hs8,fragSRC} from '@/util/util'
    import website from '@/config/website'
    import CommonTimeTop from '@/components/ocean/CommonTimeTop'
    export default {
        name: "SearchOne",
        components: {DialogDownload,CommonTimeTop},
        data() {
            return {
                target:['Shipper name','Consignee name'],
                form: {
                    basename: '',
                    hs: '',
                    Pro: '',
                    country: '',
                    Shipper_name: '',
                    Consignee_name: '',
                    date: ''
                },
                dateShow: [],
                content: '',
                tableHead: [],
                tableData: [],
                total: 0,
                nowPage: 1,
                nowSize: 15,
                selectList: [],//查询下拉列表
                selectCountry: '阿富汗买家数据',
                multipleSelection: [],
                country: '',
                hasTime: false,
                columnStr: 'HS,Product,Consignee Name',
                searchCountry: '',
                src: 'Afghanistan',
                countryName: '',
                countryObj:{
                    en:"",
                    ch:""
                },
                tableValue:{},
                showEchart: false,
                dataType: '',
                loading:false,
                hgTitle:'',
                hsPlaceholder:'2/4/6位编码',
                digtal:6,
                hasData:false,
                isEnd:0,
                isLoad:false
            }
        },
        mounted(){
            this.init();
        },
        methods: {
            init() {//2013.12 - 2013.12 阿富汗买家
                if(this.isEnd==0){
                    this.hasTime = false;
                    this.form.basename = 'AfghanistanL_im';
                    this.countryName = 'Afghanistan Importer List';
                    this.dataType = 'L';
                    this.searchCountry = '阿富汗买家数据';
                    let date = new Date();
                    const year = date.getFullYear();
                    const month = date.getMonth() < 10 ? '0' + date.getMonth() + 1 : date.getMonth() + 1;
                    this.form.date = "2013.12 - 2013.12";
                    this.dateShow = [year + "-" + month, year + "-" + month];
                    this.selectList=[{col1: "阿富汗买家数据",
                        col2: "Afghanistan Importer List",
                        col3: "AfghanistanL_im",
                        col4: "L"}];
                    this.getColumn();
                }else{
                    return;
                }
            },
            toDetail(row) {
                let routeUrl = this.$router.resolve(`/ocean/customsData/detail/${row[0]}/${this.form.basename}`);
                window.open(routeUrl.href, '_blank');
            },
            showDataNotice(basename){
                var html="";
                switch(basename){
                    case "Pakistan_im":html="<li><b>*</b><span class=\"cn\">2018年-至今 运输方式为：海运+空运</span></li><li><b>*</b><span class=\"cn\">2008-2017年运输方式为：海运</span></li>";break;
                    case "Pakistan_ex":html="<li><b>*</b><span class=\"cn\">2018年-至今 运输方式为：海运+空运</span></li>";break;
                    case "JNPT_im":html="<li><b>*</b><span class=\"cn\">JNPT数据将停止更新，数据会整合到印度提单进口数据中，届时JNPT数据将下线</span></li>";break;
                    default:html="";break;
                }
                this.hgTitle=html;
            },
            //下载
            downLoad(type) {
                let params;
                if (type == '') {//当前选中的
                    //获取选中的结果
                    if (this.multipleSelection.length == 0) {
                        this.$message({
                            message: '请先选择要下载的数据',
                            type: "success"
                        });
                        return;
                    }
                    params = {
                        basename: this.form.basename,
                        ids: this.multipleSelection.join(","),
                        page: this.nowPage,
                        n: ''
                    }
                } else {
                    params = {
                        basename: this.form.basename,
                        ids: '',
                        page: 1,
                        n: 'all'
                    }

                }
                downLoad(params).then(res => {
                    if (res.data.success) {
                        const result = res.data.data;
                        if (result.hasDown) { //true - 直接下载
                            window.open(website.hg_URL + result.file, '_blank');
                        } else { //弹框显示剩余数量
                            this.$refs.dialogDownload.init(Object.assign({}, params, result));
                        }
                    }
                }).catch(err => {
                    console.log(err)
                })
            },
            querySearch(queryString, cb) {
                // 调用 callback 返回建议列表的数据
                searchList(queryString).then(res => {
                    if (res.data.success) {
                        const result = res.data.data;
                        this.selectList = result;
                        let target = [];
                        result.forEach(item => {
                            if (item.col1.indexOf('买家') != -1 || item.col1.indexOf('卖家') != -1) {
                                target.push(item.col1);
                            }
                        })
                        cb(target);
                    } else {
                        cb([])
                    }
                }).catch(err => {
                    cb([])
                })
            },
            //判断显示哪些字段
            getColumn() {
                this.loading=true;
                getInput(this.form.basename).then(res => {
                    this.loading=false;
                    if (res.data.success) {
                        this.isEnd++;
                        const result = res.data.data;
                        let strs = result.split("|||");
                        this.columnStr = strs[5];
                        this.hsInit(strs[4]);
                        this.ShowDate(strs[0], strs[1], strs[2], strs[3]);
                        this.showDataNotice(this.form.basename)
                    }
                }).catch(err => {
                    this.loading=false;
                    console.log(err)
                })
            },
            hsInit(str){
                this.digtal=str*1;
                if(str * 1 > 6){
                    this.hsPlaceholder = "2/4/6/" + str + " 位编码";
                }else if(str * 1 == 6){
                    this.hsPlaceholder = "2/4/6 位编码";
                }else if(str * 1 == 4){
                    this.hsPlaceholder = "2/4 位编码";
                }else if(str * 1 == 2){
                    this.hsPlaceholder = "2 位编码";
                }
            },
            ShowDate(y1, m1, y2, m2) {
                if (!this.SeaBOLData(this.form.basename)) {
                    this.form.date = y2 + "." + m2 + " - " + y2 + "." + m2;
                    this.dateShow = [y2 + "-" + m2, y2 + "-" + m2]
                } else {
                    this.form.date = y2 + " - " + y2;
                    this.dateShow = [y2 + "-01", y2 + "-12"]
                }
                if (this.NotDate() || (y1 == '' && m1 == '' && y2 == '' && m2 == '')) {//待定
                    this.hasTime = false;
                } else {
                    this.hasTime = true;
                }
                this.searchCountry = '';
            },
            countryBlur() {
                let Index = -1;
                if (this.selectList.length > 0) {
                    this.selectList.map((item, index) => {
                        if (item.col1 == this.searchCountry) {
                            Index = index;
                        }
                    })
                }
                if (Index == -1) {
                    this.searchCountry = ''
                }
            },
            handleSelectionChange(val) {
                this.multipleSelection=[];
                val.map(item=>{
                    this.multipleSelection.push(item[0])
                })
            },
            search() {
                if (this.form.basename == '') {
                    this.$alert('<div >请选择下拉列表的搜索条件！</div>', '搜索提醒', {
                        dangerouslyUseHTMLString: true
                    });
                    return;
                }
                //判断HS参数
                if(this.isRightHsCode(this.form.hs,this.form.basename,this.digtal)){
                    this.total = 0;
                    this.nowSize = 15;
                    this.nowPage = 1;//重新查询- 第一页开始
                    this.isLoad=true;
                    this.getList();
                }else{
                    this.$message({
                        message: 'HS编码格式输入错误！',
                        type: "success"
                    });
                }
            },
            isRightHsCode(hs,basename,digtal) { //01 usa_ex 6
                if ((hs.length > 8 && hs.length == digtal) || hs.length == 2 || hs.length == 4 || hs.length == 6 || hs.length == 8) {
                    if (basename.indexOf("Ar_") != -1 && hs.length == digtal) {
                        if (hs.substr(0, 10).search(/^[0-9]*[1-9][0-9]*$/) == -1) {
                            return false
                        }else{
                            return true
                        }
                    } else if (basename.indexOf("ArgentinaS") != -1) {
                        if (hs.search(/^\d{2}\w*$/) == -1) {
                            return false
                        }else{
                            return true
                        }
                    } else if (hs.search(/^\d{2}\w*$/) == -1) {
                        return false
                    }else{
                        return true
                    }
                } else if (hs.length == 0 || (hs8(basename) && hs.length == 8)) {
                    return true
                } else {
                    return false
                }
            },
            //查询列表数据
            getList() {
                getList(this.getParams()).then(res => {
                    this.isLoad=false;
                    if (res.data.success) {
                        const result = res.data.data;
                        if (result.data.indexOf('<html>') == -1&&result.data!='') {
                            //初始化一次
                            this.getContent(eval("(" + result.data + ")"))
                            if (this.nowPage == 1 && this.total == 0) {
                                this.tableHead = eval("(" + result.title + ")");
                                this.total = parseInt(result.total);
                                //是否显示图表 - parameter
                                this.isShowEchart(result);
                                // 用来传递给图表使用
                                let arr = result.parameter.split('&')
                                this.tableValue = {}
                                arr.forEach(value => {
                                    this.tableValue[value.split('=')[0]] = value.split('=')[1]
                                })
                            }
                        } else {
                            this.hasData=true;
                            this.tableData = [];
                        }
                    }
                }).catch(err=>{
                    this.isLoad=false;
                })
            },
            isShowEchart(result) {
                const p = this.getP();
                if (result.parameter != ""
                    && ((this.form.basename.indexOf("UK_L") != -1|| this.form.basename.indexOf("ChinaL") != -1)
                        || (this.dataType != "L" && this.form.basename != "usa_ex")
                        || (this.form.date.substring(0, 4) * 1 >= 2013&& this.form.basename == "usa"))) {
                    this.showEchart = true;
                } else {
                    this.showEchart = false;
                }
                if (this.form.basename.indexOf("IndonesiaR_") != -1 && p == 2) {
                    this.showEchart = false;
                } else if (this.form.basename.indexOf("IndonesiaR_") != -1 && (p == 0 || p == 1)) {
                    this.showEchart = true;
                }
            },
            getParams(){
                let formData = new FormData();
                formData.append('basename', this.form.basename);
                formData.append('date', this.form.date);
                formData.append('hs', this.form.hs);
                formData.append('Pro', this.form.Pro);
                formData.append('Shipper_name', '');
                formData.append('Consignee_name', this.form.Consignee_name);
                formData.append('country', this.form.country);
                formData.append('Ex_Country', '');
                formData.append('Im_Country', '');
                formData.append('Customs', '');
                formData.append('Transport', '');
                formData.append('Manufacturer', '');
                formData.append('box1', false);
                formData.append('box2', false);
                formData.append('UnitpriceS', '');
                formData.append('UnitpriceE', '');
                formData.append('Custom', '');
                formData.append('Operation', '');
                formData.append('Brand', '');
                formData.append('LoadingPort', '');
                formData.append('UnloadingPort', '');
                formData.append('Notify', '');
                formData.append('Bill', '');
                formData.append('Con', '');
                formData.append('Dp', '');
                formData.append('Place', '');
                formData.append('viewType', 0);
                formData.append('language', 'cn');
                formData.append('dataType', 'B');
                formData.append('code', '');
                formData.append('p', 0);
                formData.append('ConsigneeAddr', '');
                //分页
                formData.append('queryType', 1);
                formData.append('pageCount', this.nowSize);
                formData.append('pageNow', this.nowPage);
                formData.append('next', ((this.nowPage >1)||(this.nowSize!=15))? 1 : 0);
                return formData;
            },
            getP() {
                let p = 0;
                let Consignee = "", Customs = "", country = "";
                if (this.form.basename == "China_Importer_List") {
                    if (this.form.hs == "" && Consignee == "") {
                        p = 2;
                    }
                } else if (this.form.basename.indexOf("IndonesiaR_") != -1) {
                    if (Consignee != "" && this.form.hs == "" && Customs == "" && country == "") {
                        p = 2;
                    }
                }
                return p;
            },
            getContent(arr) {
                this.hasData=arr.length==0?true:false;
                this.tableData=[];
                if (arr.length == 0) {
                    return;
                }
                arr.forEach((item, index) => {
                    let end = [];
                    Object.keys(item).map((key) => {
                        if (key == "id") {
                            end.push(item[key])
                        } else if (key == "tname") {
                            end.push(item[key])
                        } else if (key == "month") {
                            end.push(item[key])
                        } else if (key == "shipper_name" || key == "shippername" || key == "shipper" || key == "exporter") {
                            end.push(item[key])
                        } else if (key == "consignee_name" || key == "companyname" || key == "company_name" || key == "consigneename" || key == "col02" || key == "importer") {
                            end.push(item[key])
                        } else if (key == "pro" || key == "signtext" || key == "col3" || key == "product_description" || key == "products") {
                            end.push(item[key])
                        } else if (key == "country") {
                            end.push(item[key])
                        } else {
                            end.push(item[key])
                        }
                    })
                    this.tableData.push(end)
                });
            },
            handleTime(val) {
                const start = val[0].split("-");
                const end = val[1].split("-");
                if (!this.SeaBOLData(this.form.basename)) {
                    this.form.date = start[0] + "." + start[1] + " - " + end[0] + "." + end[1]
                } else {
                    this.form.date = start[0] + " - " + end[0];
                }
            },
            //搜索按钮
            changeCountry() {
                if (this.searchCountry != '') {
                    this.reset();
                    this.form.basename = this.getBaseName();
                    this.selectCountry = this.searchCountry;
                    this.getColumn();
                } else {
                    this.$alert('<div >请选择搜索条件！</div>', '搜索提醒', {
                        dangerouslyUseHTMLString: true
                    });
                }
            },
            getBaseName() {
                let dataType;
                this.selectList.map((item, index) => {
                    if (item.col1 == this.searchCountry) {
                        dataType = item.col3;
                        //国旗处理
                        this.countryObj.ch = item.col1;
                        this.countryObj.en = item.col2;
                        this.countryName = item.col2;
                        this.dataType = item.col4;
                        this.src= fragSRC(item)
                    }
                })
                return dataType;
            },
            handleSelect(item) {
                this.searchCountry = item;
                this.changeCountry();
            },
            querySearchCity(queryString, cb) {
                let data = cityJSON;
                let results = queryString ? data.filter(this.createFilterCity(queryString)) : data;
                cb(results);
            },
            createFilterCity(queryString) {
                return (restaurant) => {
                    return (restaurant.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
                };
            },
            //查看国家图表
            lookEchart() {
                // 判断是否为美国进口，进行单独处理
                let url = isUSA(this.form.basename)
                let routeUrl = ''
                if (url == '/customs/table') {
                    routeUrl = this.$router.resolve(url)
                } else {
                    let form = JSON.parse(JSON.stringify(this.form))
                    form.dateShow = this.dateShow
                    routeUrl = this.$router.resolve({
                        path: url,
                        query: {
                            info: JSON.stringify(Object.assign(form, this.countryObj, this.tableValue)),
                        }
                    });
                }
                window.open(routeUrl.href, '_blank');
            },
            handleSizeChange(size) { //  条数发生改变
                this.nowSize = size;
                this.getList();
            },
            handleCurrentChange(page) { //页数发生变化
                this.nowPage = page;
                this.getList();
            },
            reset() {
                this.form.hs='';
                this.form.Pro='';
                this.form.Shipper_name='';
                this.form.Consignee_name='';
                this.form.country='';
            },
            NotDate() {
                //dataType , selectName
                const selectName = this.form.basename;
                let dataType = '';
                this.selectList.map((item, index) => {
                    if (item.col1 == this.searchCountry) {
                        dataType = item.col4;
                    }
                })
                if (dataType != "L" || selectName.indexOf("ChinaL") != -1 || selectName.indexOf("SpainL") != -1 || selectName.indexOf("UK_L") != -1 || selectName == "CanadaL_im") {
                    return false;
                } else {
                    return true;
                }
            },
            SeaBOLData(c) {
                var base = c.split('-')[0];
                var b = false;
                switch (base.replace("_im", "").replace("_ex", "")) {
                    case "ALGERIA_BOL":
                        b = true;
                        break;
                    case "AUSTRALIA_BOL":
                        b = true;
                        break;
                    case "BAHRAIN_BOL":
                        b = true;
                        break;
                    case "BANGLADESH_BOL":
                        b = true;
                        break;
                    case "BELGIUM_BOL":
                        b = true;
                        break;
                    case "BENIN_BOL":
                        b = true;
                        break;
                    case "BRAZIL_BOL":
                        b = true;
                        break;
                    case "CAMBODIA_BOL":
                        b = true;
                        break;
                    case "CANADA_BOL":
                        b = true;
                        break;
                    case "CHINA_BOL":
                        b = true;
                        break;
                    case "COTE_D_IVOIRE_BOL":
                        b = true;
                        break;
                    case "DENMARK_BOL":
                        b = true;
                        break;
                    case "DJIBOUTI_BOL":
                        b = true;
                        break;
                    case "EGYPT_BOL":
                        b = true;
                        break;
                    case "ESTONIA_BOL":
                        b = true;
                        break;
                    case "FINLAND_BOL":
                        b = true;
                        break;
                    case "FRANCE_BOL":
                        b = true;
                        break;
                    case "GERMANY_BOL":
                        b = true;
                        break;
                    case "GHANA_BOL":
                        b = true;
                        break;
                    case "GREECE_BOL":
                        b = true;
                        break;
                    case "INDONESIA_BOL":
                        b = true;
                        break;
                    case "IRAN_BOL":
                        b = true;
                        break;
                    case "IRAQ_BOL":
                        b = true;
                        break;
                    case "IRELAND_BOL":
                        b = true;
                        break;
                    case "ISRAEL_BOL":
                        b = true;
                        break;
                    case "ITALY_BOL":
                        b = true;
                        break;
                    case "JAPAN_BOL":
                        b = true;
                        break;
                    case "JORDAN_BOL":
                        b = true;
                        break;
                    case "KENYA_BOL":
                        b = true;
                        break;
                    case "KUWAIT_BOL":
                        b = true;
                        break;
                    case "LATVIA_BOL":
                        b = true;
                        break;
                    case "LEBANON_BOL":
                        b = true;
                        break;
                    case "LITHUANIA_BOL":
                        b = true;
                        break;
                    case "MACAU_BOL":
                        b = true;
                        break;
                    case "MALAYSIA_BOL":
                        b = true;
                        break;
                    case "MALTA_BOL":
                        b = true;
                        break;
                    case "MOROCCO_BOL":
                        b = true;
                        break;
                    case "MYANMAR_BOL":
                        b = true;
                        break;
                    case "NETHERLANDS_BOL":
                        b = true;
                        break;
                    case "NEW_ZEALAND_BOL":
                        b = true;
                        break;
                    case "NIGERIA_BOL":
                        b = true;
                        break;
                    case "SOUTH_KOREA_BOL":
                        b = true;
                        break;
                    case "NORWAY_BOL":
                        b = true;
                        break;
                    case "OMAN_BOL":
                        b = true;
                        break;
                    case "PHILIPPINES_BOL":
                        b = true;
                        break;
                    case "POLAND_BOL":
                        b = true;
                        break;
                    case "PORTUGAL_BOL":
                        b = true;
                        break;
                    case "QATAR_BOL":
                        b = true;
                        break;
                    case "SAUDI_ARABIA_BOL":
                        b = true;
                        break;
                    case "SENEGAL_BOL":
                        b = true;
                        break;
                    case "SINGAPORE_BOL":
                        b = true;
                        break;
                    case "SLOVENIA_BOL":
                        b = true;
                        break;
                    case "SOUTH_AFRICA_BOL":
                        b = true;
                        break;
                    case "SPAIN_BOL":
                        b = true;
                        break;
                    case "SUDAN_BOL":
                        b = true;
                        break;
                    case "SWEDEN_BOL":
                        b = true;
                        break;
                    case "SYRIA_BOL":
                        b = true;
                        break;
                    case "TAIWAN_BOL":
                        b = true;
                        break;
                    case "TANZANIA_BOL":
                        b = true;
                        break;
                    case "THAILAND_BOL":
                        b = true;
                        break;
                    case "TOGO_BOL":
                        b = true;
                        break;
                    case "TUNISIA_BOL":
                        b = true;
                        break;
                    case "TURKEY_BOL":
                        b = true;
                        break;
                    case "UNITED_ARAB_EMIRATES_BOL":
                        b = true;
                        break;
                    case "UNITED_KINGDOM_BOL":
                        b = true;
                        break;
                    case "UNITED_STATES_BOL":
                        b = true;
                        break;
                    case "VIETNAM_BOL":
                        b = true;
                        break;
                }
                return b;
            },
        }
    }
</script>

<style scoped lang="scss">
  @import '@/styles/customs.scss';
</style>
